<?php
	include('database.php');
	$templine = '';
	$lines = file('query.sql');
	foreach ($lines as $line) {
		if (substr($line, 0, 2) == '--' || $line == '')
			continue;
		$templine .= $line;
		if (substr(trim($line), -1, 1) == ';') {
			mysql_query($templine);
			$templine = '';
		}
	}
	echo 'База данных заполнена!';
?>